﻿using SIG.Model.Identity;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;


namespace SIG.Model.Mapping
{
    public class UserSafetyMap: EntityTypeConfiguration<UserSafety>
    {
        public UserSafetyMap()
        {
            this.HasKey(b => b.Id);
            this.Property(b => b.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.ToTable("UserSafetySet");

            Property(p => p.Code).IsRequired();
            Property(p => p.Username).HasMaxLength(50).IsRequired();
            this.Property(p => p.EmailType).IsRequired();
            this.Property(p => p.Timeout).IsRequired();
            this.Property(p => p.CreatedDate).IsRequired().HasColumnType("datetime");
         

          }
       
    }
}
